/*
 * @Description:
 * @Author: Tsingwong
 * @Date: 2020-11-27 11:03:13
 * @LastEditors: Tsingwong
 * @LastEditTime: 2020-11-30 19:13:32
 */
import { fromJS } from 'immutable'
import * as constants from './actionType'

const defaultState = fromJS({
  login: false,
})

export default (prevState = defaultState, action) => {
  switch (action.type) {
    case constants.SET_LOGIN_STATE:
      return prevState.merge({
        login: action.params,
      })
    default:
      return prevState
  }
}
